home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Incognito / init / install.a < prev    next >
Encoding:
Text File  |  1993-12-26  |  825 b   |  37 lines  |  [TEXT/MPS ]

  1.         CASE OBJ
  2. ;
  3. ;    Install routine, mostly grabbed from Apple's INIT/CDEV combo. It installs
  4. ;    the patch to PrGlue, & shows the appropriate icon. Nothing exciting.
  5. ;
  6.                 include 'Traps.a'
  7.  
  8. INITInstall        PROC    EXPORT
  9.                 import    MyControl:code
  10.                 import    setTrap:code
  11.                 import    Initialize:code
  12.                 
  13. FirstResByte    EQU        MyControl
  14. start            movem.l    a0-a6/d0-d7, -(sp)        ; save the registers!
  15.                 
  16.                 move.w    #$a004, d0
  17.                 _GetTrapAddress
  18.                 bsr        setTrap
  19.                 
  20.                 bsr        Initialize                ; initialize init
  21.                 bne.s    exit                    ; if return value in d0, blow out
  22.                 
  23.                 lea        INITInstall, a0
  24.                 _RecoverHandle
  25.                 move.l    a0, -(a7)
  26.                 _DetachResource
  27.                 
  28.                 lea        MyControl, a0
  29.                 move.w    #$a004, d0
  30.                 _SetTrapAddress ,NEWOS
  31.                 
  32. exit            movem.l    (sp)+, a0-a6/d0-d7        ; restore the registers
  33.                 rts                                ; return to INIT 31
  34.  
  35.                 ENDP
  36.                 END
  37.